
#include "widget.h"

#include <QApplication>
#include <QFile>

QString loadQSS()
{
    QFile file(":/style.qss");
    file.open(QFile::ReadOnly);
    QString style = file.readAll();
    // 关闭文件
    file.close();
    return style;
}

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //a.setStyleSheet("QPushButton {color: red;}");
    //a.setStyleSheet(loadQSS());
//    QString style = "QPushButton {color: red;}";
//    style += "#pushButton_2 {color: green;}";
//    style += "#pushButton_3 {color: green;}";
    QString style = "QPushButton, QLineEdit, QLabel {color: red;}";
    a.setStyleSheet(style);
    Widget w;
    w.show();
    return a.exec();
}
